#include<stdio.h>
#include<stdlib.h>
#include<sqlite3.h>
#include<string.h>
#include<limits.h>

char buf[LINE_MAX];

char* concat(char* arg){
	/*char* sql;
		sql = "SELECT ";
		strcpy(buf,sql);
		strcat(buf,arg);
		strcat(buf," FROM ");
		strcat(buf,"COMPANY");
		*/
		snprintf(buf,sizeof(buf),"%s%s%s%s","SELECT ",arg," FROM ","COMPANY");
	
	return &(buf[0]);
}


int main(int argc, char* argv[]){
	if(argc < 2){
		perror("no argument\n");
		exit(EXIT_SUCCESS);
	}
	char* res;
		res = concat(argv[1]);
		printf("Statement now: %s\n",res);
		
	return 0;
}
